const fs = require('fs');
fs.readFile('./成绩.txt','utf8',function(err,data){
    if(err){
        return console.log('读取失败！' + err.message);
    }
    let arr = data.split(' ');
    // console.log(arr);
    let newArr = [];
    arr.map(item => {
        newArr.push(item.replace('=',':'))
    });
    let newData = newArr.join("\r\n");
    // console.log(newData);
    //写入
    fs.writeFile('./成绩修改.txt',newData,function(err){
        if(err){
            console.log("读取失败"+err.message);
        }else{
            console.log("读取成功！");
        }
    })
    
})